package me.jiatao.usercenter.injection.component


import android.app.Activity
import dagger.Component
import me.jiatao.baselibrary.injection.component.ActivityComponent
import me.jiatao.baselibrary.injection.scope.PerComponentScope
import me.jiatao.usercenter.injection.module.UserModule
import me.jiatao.usercenter.mvp.service.UserService
import me.jiatao.usercenter.ui.activity.LoginActivity
import me.jiatao.usercenter.ui.activity.RegisterActivity
import me.jiatao.usercenter.ui.activity.UserInfoActivity

/**
 * 用户模块Component
 */
@PerComponentScope
@Component(
    dependencies = [ActivityComponent::class],
    modules = [UserModule::class]
)
interface UserComponent {

    /**
     * 提供modules中实例
     */
    fun userService(): UserService

    fun inject(activity: RegisterActivity)
    fun inject(activity: LoginActivity)
    fun inject(activity: UserInfoActivity)
}
